Glaxed
May 20th, 2008, 02:28 AM
Have you ever been using APT in the terminal and you get sick and tired of typing out 'sudo apt-get install ' or 'apt-cache search' or 'sudo apt-get remove'?
How about 'sudo apt-get autoclean' and then upgrade, update, and re-installation? I have found this very annoying especially when I update distros.
For a frequent APT user, this is just wasted time.
So I wrote a program to make this very quick, and I attached the source code to the thread.
The comments/documentation explains my program well.
Sample Usage:
$ up up
versus
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean
Code suggestions (I'm new to C++) or feature requests can be emailed to me at vminch@gmail.com or you could just post it here.
I hope someone finds this useful - I know this saves me a ton of time.
http://i238.photobucket.com/albums/ff6/vminch/inaction.png
--- Great screen shot demonstrating the usage.
/* up.cpp Version 2 - Copyright Vedant Kumar 2008 GPLv3
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* >>> Description:
* This program is designed to increase the speed at which
* users of APT, or the Advanced Package Tool, can work with software
* packages in a terminal.
*
* >>> Usage:
* Update & Autoclean (-args/-regex): $ up up
* Install (+args/+regex): $ up in packages
* Uninstall (+args/+regex): $ up rm packages
* Autoclean (-args/-regex): $ up cl
* Search (1 arg/+regex): $ up se package
*
* up can take multiple arguments and simple regex for certain options;
* $ up [option] package1 package2 packageN
* $ up [option] package*
*
* >>> Building:
* 1. The Normal Way
* $ g++ -fconserve-space up.cpp -o up
*
* 2. The Recommended Way
* >>> Pre-req: Place this file on your desktop and install g++/build-essential.
* $ cd ~/Desktop && g++ -fconserve-space up.cpp -o up && sudo mv up /usr/bin/
*
* To explain, this command will find the up.cpp file on your Desktop
* and compile it. Then, it will move it into the /usr/bin directory.
* It will need your password for this.
*/
How about 'sudo apt-get autoclean' and then upgrade, update, and re-installation? I have found this very annoying especially when I update distros.
For a frequent APT user, this is just wasted time.
So I wrote a program to make this very quick, and I attached the source code to the thread.
The comments/documentation explains my program well.
Sample Usage:
$ up up
versus
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean
Code suggestions (I'm new to C++) or feature requests can be emailed to me at vminch@gmail.com or you could just post it here.
I hope someone finds this useful - I know this saves me a ton of time.
http://i238.photobucket.com/albums/ff6/vminch/inaction.png
--- Great screen shot demonstrating the usage.
/* up.cpp Version 2 - Copyright Vedant Kumar 2008 GPLv3
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* >>> Description:
* This program is designed to increase the speed at which
* users of APT, or the Advanced Package Tool, can work with software
* packages in a terminal.
*
* >>> Usage:
* Update & Autoclean (-args/-regex): $ up up
* Install (+args/+regex): $ up in packages
* Uninstall (+args/+regex): $ up rm packages
* Autoclean (-args/-regex): $ up cl
* Search (1 arg/+regex): $ up se package
*
* up can take multiple arguments and simple regex for certain options;
* $ up [option] package1 package2 packageN
* $ up [option] package*
*
* >>> Building:
* 1. The Normal Way
* $ g++ -fconserve-space up.cpp -o up
*
* 2. The Recommended Way
* >>> Pre-req: Place this file on your desktop and install g++/build-essential.
* $ cd ~/Desktop && g++ -fconserve-space up.cpp -o up && sudo mv up /usr/bin/
*
* To explain, this command will find the up.cpp file on your Desktop
* and compile it. Then, it will move it into the /usr/bin directory.
* It will need your password for this.
*/