DEV Community

loading...

Start a new job, automate tools setup.

YusufAdel
Hi I'm Yusuf, a computer science probationer student. -I want to keep learning and growing both My interpersonal and technical skills so that I can strive to be the most successful version of myself.
・1 min read

Feel free to share your scripts

Scripts: that installs all the tools you need

Objective of this discuss is to find many solutions as possible for different platforms to help Getting start with setting up necessary tools

By the end of this discuss, I hope we get a useful solution for automating setups for various OS specially Debian based distros

Discussion (3)

Collapse
yusufadel profile image
YusufAdel Author

cron

Actually i found the tool that get the job done (cron)
it's a time-based job scheduler
For example, you can run a backup of all your user accounts
with this command you add when editing the crontab

$crontab -e
0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
It means that at 5 a.m every week your user accounts will be backupped
, If its not a command you can run a script

With providing script PATH that's it
like this for example accomplished with python code

#!usr/bin/env python3 
from gi.repository import Notify
Notify.init("App Name")
Notify.Notification.new("Hi, Awesome").show()

Enter fullscreen mode Exit fullscreen mode

add this with crontab -e
@reboot PATH_TO_FILE

consider reading the docs for more control !

Collapse
gbafana25 profile image
Gareth M.

I have a bash script that saves a list of installed packages, backups up all my dotfiles in the home directory, and uploads it to a private git repo.

Packages

I use apt-mark showmanual, which isn't the best solution since it saves some packages that aren't "user-installed"

Dotfiles

I just have a text file with the name of the file or directory listed on every line, and the script just loops through it to make copies. I also have additional functions to setup my terminal (st) and my window manager (dwm), since those need to be compiled.

Each commit message includes a timestamp.

Collapse
melezhik profile image
Alexey Melezhik

Hi! I am author of SparrowHub - you can find a lot of scripts for automation here.

You can also combine them with Tomtit - Raku task runner to get you up to the speed 🚄!