Add package functionality to dotfiles manager
This commit is contained in:
@@ -6,91 +6,9 @@ This is a collection of dotfiles and scripts for my i3 setup, previewed below:
|
|||||||
|
|
||||||
### Software:
|
### Software:
|
||||||
|
|
||||||
All packages that are manually installed via pacman -S, dependencies not included.
|
All packages that are manually installed via pacman -S, can be found in the packages file,
|
||||||
|
dependencies are not included.
|
||||||
|
|
||||||
-- installed during installation
|
|
||||||
base
|
|
||||||
base-devel
|
|
||||||
sudo
|
|
||||||
iw
|
|
||||||
wpa_supplicant
|
|
||||||
dialog
|
|
||||||
-- installed after booting into system
|
|
||||||
git
|
|
||||||
openssh
|
|
||||||
pacaur
|
|
||||||
xorg-server
|
|
||||||
xorg-xinit
|
|
||||||
xorg-xrandr
|
|
||||||
xorg-xbacklight
|
|
||||||
xf86-video-intel
|
|
||||||
i3-gaps
|
|
||||||
rofi
|
|
||||||
feh
|
|
||||||
i3blocks
|
|
||||||
i3lock-color-git (AUR)
|
|
||||||
acpi
|
|
||||||
playerctl
|
|
||||||
alsa-utils
|
|
||||||
sysstat
|
|
||||||
screenfetch
|
|
||||||
scrot
|
|
||||||
imagemagick
|
|
||||||
rxvt-unicode
|
|
||||||
zsh
|
|
||||||
zsh-completions
|
|
||||||
libx264
|
|
||||||
ttf-dejavu
|
|
||||||
ttf-dejavu-sans-mono-powerline-git (AUR)
|
|
||||||
firefox
|
|
||||||
libnotify
|
|
||||||
pulseaudio
|
|
||||||
pulseaudio-alsa
|
|
||||||
pavucontrol
|
|
||||||
thunar
|
|
||||||
thunar-volman
|
|
||||||
gvfs
|
|
||||||
tumbler
|
|
||||||
ffmpegthumbnailer
|
|
||||||
poppler-glib
|
|
||||||
gtk-theme-arc-git (AUR)
|
|
||||||
arc-icon-theme-git (AUR)
|
|
||||||
moka-icon-theme-git (AUR)
|
|
||||||
lxappearance
|
|
||||||
ntfs-3g
|
|
||||||
exfat-utils
|
|
||||||
gedit
|
|
||||||
thunderbird
|
|
||||||
qbittorrent
|
|
||||||
filezilla
|
|
||||||
tlp
|
|
||||||
smartmontools
|
|
||||||
x86_energy_perf_policy
|
|
||||||
intel-ucode
|
|
||||||
mpv
|
|
||||||
youtube-dl
|
|
||||||
rtmpdump
|
|
||||||
xarchiver
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
unrar
|
|
||||||
p7zip
|
|
||||||
texlive-most
|
|
||||||
gvfs-mtp
|
|
||||||
gvfs-gphoto2
|
|
||||||
chromium
|
|
||||||
zathura
|
|
||||||
zathura-pdf-mupdf
|
|
||||||
xdotool
|
|
||||||
python2-setuptools
|
|
||||||
python2-click-5.1 (AUR)
|
|
||||||
platformio (AUR)
|
|
||||||
gvim
|
|
||||||
checkbashisms (AUR)
|
|
||||||
xss-lock-git (AUR)
|
|
||||||
inkscape
|
|
||||||
cura
|
|
||||||
wpa_actiond
|
|
||||||
|
|
||||||
### Configuration:
|
### Configuration:
|
||||||
|
|
||||||
|
|||||||
+38
-5
@@ -5,21 +5,24 @@ if [ "$(dirname $0)" != "." ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PACKAGE_FILE="./packages"
|
||||||
|
|
||||||
FILES=$(find . \( -path ./.git -o \
|
FILES=$(find . \( -path ./.git -o \
|
||||||
|
-path ./dotfiles.sh -o \
|
||||||
|
-path $PACKAGE_FILE -o \
|
||||||
-path ./README.md -o \
|
-path ./README.md -o \
|
||||||
-path ./screenshot.png -o \
|
-path ./screenshot.png \) -prune -o -type f -print)
|
||||||
-path ./dotfiles.sh \) -prune -o -type f -print)
|
|
||||||
|
|
||||||
if [ "$1" == "help" ] || [ "$1" == "" ]; then
|
if [ "$1" == "help" ] || [ "$1" == "" ]; then
|
||||||
BOLD=$(tput bold)
|
BOLD=$(tput bold)
|
||||||
NORMAL=$(tput sgr0)
|
NORMAL=$(tput sgr0)
|
||||||
|
|
||||||
echo "${BOLD}NAME${NORMAL}"
|
echo "${BOLD}NAME${NORMAL}"
|
||||||
echo " dotfiles - file copy script for this repository"
|
echo " dotfiles - file copy script for this repository"
|
||||||
echo ""
|
echo ""
|
||||||
echo "${BOLD}SYNOPSIS${NORMAL}"
|
echo "${BOLD}SYNOPSIS${NORMAL}"
|
||||||
echo " ./dotfiles.sh <command> [<args>]"
|
echo " ./dotfiles.sh <command> [<args>]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "${BOLD}COMMANDS${NORMAL}"
|
echo "${BOLD}COMMANDS${NORMAL}"
|
||||||
echo " list"
|
echo " list"
|
||||||
echo " Prints all the dotfiles added to this directory."
|
echo " Prints all the dotfiles added to this directory."
|
||||||
@@ -34,6 +37,16 @@ on the system to this directory."
|
|||||||
echo " push"
|
echo " push"
|
||||||
echo " For each file in this directory, copy that file \
|
echo " For each file in this directory, copy that file \
|
||||||
to its location on the system."
|
to its location on the system."
|
||||||
|
echo ""
|
||||||
|
echo " package [list]"
|
||||||
|
echo " List all the packages installed on the system."
|
||||||
|
echo ""
|
||||||
|
echo " package store"
|
||||||
|
echo " Store the list of all the installed packages on the \
|
||||||
|
system."
|
||||||
|
echo ""
|
||||||
|
echo " package install"
|
||||||
|
echo " Install all the core packages of the list."
|
||||||
|
|
||||||
elif [ "$1" == "list" ]; then
|
elif [ "$1" == "list" ]; then
|
||||||
for f in $FILES; do
|
for f in $FILES; do
|
||||||
@@ -43,7 +56,7 @@ elif [ "$1" == "list" ]; then
|
|||||||
elif [ "$1" == "get" ] && [ "$2" != "" ]; then
|
elif [ "$1" == "get" ] && [ "$2" != "" ]; then
|
||||||
FILE=$(readlink -f $2)
|
FILE=$(readlink -f $2)
|
||||||
FILE_CUT_HOME="$(echo $FILE | sed -nr 's/^\/home\/'$USER'\/(.*)$/\1/p')"
|
FILE_CUT_HOME="$(echo $FILE | sed -nr 's/^\/home\/'$USER'\/(.*)$/\1/p')"
|
||||||
|
|
||||||
# /home/<user>/
|
# /home/<user>/
|
||||||
if [ -n "$FILE_CUT_HOME" ]; then
|
if [ -n "$FILE_CUT_HOME" ]; then
|
||||||
mkdir -p $(pwd)/$(dirname $FILE_CUT_HOME)
|
mkdir -p $(pwd)/$(dirname $FILE_CUT_HOME)
|
||||||
@@ -78,9 +91,29 @@ elif [ "$1" == "pull" ] || [ "$1" == "push" ]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
elif [ "$1" == "package" ]; then
|
||||||
|
PACKAGE_LIST=$(comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort))
|
||||||
|
|
||||||
|
if [ "$2" == "list" ] || [ "$2" == "" ]; then
|
||||||
|
echo "$PACKAGE_LIST"
|
||||||
|
elif [ "$2" == "store" ]; then
|
||||||
|
if [ ! -s $PACKAGE_FILE ]; then
|
||||||
|
touch "$PACKAGE_FILE"
|
||||||
|
else
|
||||||
|
truncate -s 0 "$PACKAGE_FILE"
|
||||||
|
fi
|
||||||
|
echo "$PACKAGE_LIST" > "$PACKAGE_FILE"
|
||||||
|
elif [ "$2" == "install" ]; then
|
||||||
|
# Install core packages
|
||||||
|
sudo pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort $PACKAGE_FILE))
|
||||||
|
# For AUR packages, run: <helper> -S - < packages
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "./dotfiles.sh: '$1' is not a dotfiles command. \
|
echo "./dotfiles.sh: '$1' is not a dotfiles command. \
|
||||||
See './dotfiles.sh help'."
|
See './dotfiles.sh help'."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# @Todo:
|
||||||
|
# get function to support symlinks
|
||||||
|
# push function to push just one file
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
acpi
|
||||||
|
adobe-source-han-sans-otc-fonts
|
||||||
|
alsa-utils
|
||||||
|
arandr
|
||||||
|
arc-icon-theme-git
|
||||||
|
capitaine-cursors
|
||||||
|
checkbashisms
|
||||||
|
chromium
|
||||||
|
clang
|
||||||
|
cower
|
||||||
|
cura
|
||||||
|
dialog
|
||||||
|
domoticz-git
|
||||||
|
dos2unix
|
||||||
|
efibootmgr
|
||||||
|
exfat-utils
|
||||||
|
feh
|
||||||
|
ffmpegthumbnailer
|
||||||
|
filezilla
|
||||||
|
firefox
|
||||||
|
gedit
|
||||||
|
git
|
||||||
|
gnome-themes-standard
|
||||||
|
gtk-theme-arc-git
|
||||||
|
gucharmap
|
||||||
|
gvfs
|
||||||
|
gvfs-gphoto2
|
||||||
|
gvfs-mtp
|
||||||
|
gvim
|
||||||
|
htop
|
||||||
|
i3blocks
|
||||||
|
i3-gaps
|
||||||
|
i3lock-color-git
|
||||||
|
imagemagick
|
||||||
|
inkscape
|
||||||
|
intel-ucode
|
||||||
|
iw
|
||||||
|
jdk9-openjdk
|
||||||
|
krita
|
||||||
|
libmtp
|
||||||
|
libnotify
|
||||||
|
libx264
|
||||||
|
lxappearance
|
||||||
|
mariadb
|
||||||
|
moka-icon-theme-git
|
||||||
|
mpv
|
||||||
|
mysql-workbench
|
||||||
|
neofetch
|
||||||
|
ntfs-3g
|
||||||
|
openssh
|
||||||
|
os-prober
|
||||||
|
p7zip
|
||||||
|
pacaur
|
||||||
|
pavucontrol
|
||||||
|
platformio
|
||||||
|
playerctl
|
||||||
|
poppler-glib
|
||||||
|
powertop
|
||||||
|
pulseaudio
|
||||||
|
pulseaudio-alsa
|
||||||
|
python2-click-5.1
|
||||||
|
python2-setuptools
|
||||||
|
qbittorrent
|
||||||
|
qt5ct
|
||||||
|
qt5-serialport
|
||||||
|
qt5-styleplugins
|
||||||
|
qt5-tools
|
||||||
|
rofi
|
||||||
|
rtmpdump
|
||||||
|
rxvt-unicode
|
||||||
|
scrot
|
||||||
|
sloccount
|
||||||
|
smartmontools
|
||||||
|
sysstat
|
||||||
|
texlive-bibtexextra
|
||||||
|
texlive-core
|
||||||
|
texlive-fontsextra
|
||||||
|
texlive-formatsextra
|
||||||
|
texlive-games
|
||||||
|
texlive-humanities
|
||||||
|
texlive-latexextra
|
||||||
|
texlive-music
|
||||||
|
texlive-pictures
|
||||||
|
texlive-pstricks
|
||||||
|
texlive-publishers
|
||||||
|
texlive-science
|
||||||
|
thunar
|
||||||
|
thunar-volman
|
||||||
|
thunderbird
|
||||||
|
tlp
|
||||||
|
ttf-dejavu
|
||||||
|
ttf-dejavu-sans-mono-powerline-git
|
||||||
|
tumbler
|
||||||
|
unrar
|
||||||
|
unzip
|
||||||
|
wpa_actiond
|
||||||
|
wpa_supplicant
|
||||||
|
x86_energy_perf_policy
|
||||||
|
xarchiver
|
||||||
|
xdotool
|
||||||
|
xf86-video-intel
|
||||||
|
xorg-server
|
||||||
|
xorg-xbacklight
|
||||||
|
xorg-xinit
|
||||||
|
xorg-xinput
|
||||||
|
xorg-xprop
|
||||||
|
xorg-xrandr
|
||||||
|
xss-lock-git
|
||||||
|
youtube-dl
|
||||||
|
zathura
|
||||||
|
zathura-pdf-mupdf
|
||||||
|
zip
|
||||||
|
zsh
|
||||||
|
zsh-completions
|
||||||
Reference in New Issue
Block a user