|
|
@ -14,39 +14,40 @@ FILES=$(find . \( -path ./.git -o \ |
|
|
|
-path ./screenshot.png \) -prune -o -type f -print) |
|
|
|
-path ./screenshot.png \) -prune -o -type f -print) |
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" == "help" ] || [ "$1" == "" ]; then |
|
|
|
if [ "$1" == "help" ] || [ "$1" == "" ]; then |
|
|
|
BOLD=$(tput bold) |
|
|
|
B=$(tput bold) |
|
|
|
NORMAL=$(tput sgr0) |
|
|
|
N=$(tput sgr0) |
|
|
|
|
|
|
|
|
|
|
|
echo "${BOLD}NAME${NORMAL}" |
|
|
|
cat << EOF |
|
|
|
echo " dotfiles - file copy script for this repository" |
|
|
|
${B}NAME${N} |
|
|
|
echo "" |
|
|
|
dotfiles - file copy script for the dotfiles repository |
|
|
|
echo "${BOLD}SYNOPSIS${NORMAL}" |
|
|
|
|
|
|
|
echo " ./dotfiles.sh <command> [<args>]" |
|
|
|
${B}SYNOPSIS${N} |
|
|
|
echo "" |
|
|
|
./dotfiles.sh <command> [<args>] |
|
|
|
echo "${BOLD}COMMANDS${NORMAL}" |
|
|
|
|
|
|
|
echo " list" |
|
|
|
${B}COMMANDS${N} |
|
|
|
echo " Prints all the dotfiles added to this directory." |
|
|
|
${B}list${N} |
|
|
|
echo "" |
|
|
|
Print all files added to the dotfiles directory. |
|
|
|
echo " get <filepath>" |
|
|
|
|
|
|
|
echo " Add file to this directory." |
|
|
|
${B}get <filepath>${N} |
|
|
|
echo "" |
|
|
|
Add file to the dotfiles directory. |
|
|
|
echo " pull" |
|
|
|
|
|
|
|
echo " For each file in this directory, copy that file \ |
|
|
|
${B}pull${N} |
|
|
|
on the system to this directory." |
|
|
|
For each file in the dotfiles directory, copy that file on the system to |
|
|
|
echo "" |
|
|
|
the dotfiles directory. |
|
|
|
echo " push" |
|
|
|
|
|
|
|
echo " For each file in this directory, copy that file \ |
|
|
|
${B}push${N} |
|
|
|
to its location on the system." |
|
|
|
For each file in the dotfiles directory, copy that file to its location |
|
|
|
echo "" |
|
|
|
on the system. |
|
|
|
echo " package [list]" |
|
|
|
|
|
|
|
echo " List all the packages installed on the system." |
|
|
|
${B}packages [list]${N} |
|
|
|
echo "" |
|
|
|
List all the packages installed on the system. |
|
|
|
echo " package store" |
|
|
|
|
|
|
|
echo " Store the list of all the installed packages on the \ |
|
|
|
${B}packages store${N} |
|
|
|
system." |
|
|
|
Store the list of all the installed packages on the system. |
|
|
|
echo "" |
|
|
|
|
|
|
|
echo " package install" |
|
|
|
${B}packages install${N} |
|
|
|
echo " Install all the core packages of the list." |
|
|
|
Install all the core packages of the list. |
|
|
|
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" == "list" ]; then |
|
|
|
elif [ "$1" == "list" ]; then |
|
|
|
for f in $FILES; do |
|
|
|
for f in $FILES; do |
|
|
@ -91,7 +92,7 @@ elif [ "$1" == "pull" ] || [ "$1" == "push" ]; then |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" == "package" ]; then |
|
|
|
elif [ "$1" == "packages" ]; then |
|
|
|
PACKAGE_LIST=$(comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)) |
|
|
|
PACKAGE_LIST=$(comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)) |
|
|
|
|
|
|
|
|
|
|
|
if [ "$2" == "list" ] || [ "$2" == "" ]; then |
|
|
|
if [ "$2" == "list" ] || [ "$2" == "" ]; then |
|
|
|