mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-23 03:32:30 +00:00
switch-theme: fix indentation
This commit is contained in:
parent
e17d9ed284
commit
d1f5aaaa88
|
@ -1,26 +1,24 @@
|
||||||
#! /usr/bin/make -f
|
#! /usr/bin/make -f
|
||||||
|
|
||||||
# Awesome Copycats switch theme script
|
# awesome-copycats switch theme (and update) script
|
||||||
# It also updates to latest commit.
|
# dependencies: make, git
|
||||||
# Dependencies: make, git
|
|
||||||
|
|
||||||
|
|
||||||
DESTDIR=~/.config/awesome
|
DESTDIR=~/.config/awesome
|
||||||
PROJECT=copycat-killer/awesome-copycats
|
PROJECT=copycat-killer/awesome-copycats
|
||||||
|
|
||||||
# $(swap_dialog)
|
# $(swap_dialog)
|
||||||
define swap_dialog
|
define swap_dialog
|
||||||
echo ; \
|
echo ; \
|
||||||
echo "see https://github.com/$(PROJECT)" ; \
|
echo "see https://github.com/$(PROJECT)" ; \
|
||||||
echo ; $(themes) | cat -n ; echo ; \
|
echo ; $(themes) | cat -n ; echo ; \
|
||||||
typeset -i num; \
|
typeset -i num; \
|
||||||
read -p "Switch to theme: " num ; \
|
read -p "Switch to theme: " num ; \
|
||||||
if [ ! -z $${num} -a $${num} -ge 1 -a -le $${n_themes} ] ; then \
|
if [ ! -z $${num} -a $${num} -ge 1 -a -le $${n_themes} ] ; then \
|
||||||
NEW_THEME=$$($(themes) | head -n$${num} | tail -n1 ) ; \
|
NEW_THEME=$$($(themes) | head -n$${num} | tail -n1 ) ; \
|
||||||
mv --backup=numbered rc.lua rc.lua.previous ; \
|
mv --backup=numbered rc.lua rc.lua.previous ; \
|
||||||
cp $${NEW_THEME} rc.lua ; \
|
cp $${NEW_THEME} rc.lua ; \
|
||||||
echo "Theme is now $${NEW_THEME}"; \
|
echo "Theme is now $${NEW_THEME}"; \
|
||||||
else echo " !! Aborted. " ; fi
|
else echo " !! Aborted. " ; fi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# $(themes)
|
# $(themes)
|
||||||
|
@ -32,11 +30,11 @@ n_themes=$(themes) | wc -l
|
||||||
.SILENT : all
|
.SILENT : all
|
||||||
|
|
||||||
all: $(DESTDIR)
|
all: $(DESTDIR)
|
||||||
cd $(DESTDIR) && \
|
cd $(DESTDIR) && \
|
||||||
echo -n $(git pull)#"Already up-to-date."; \
|
echo -n $(git pull)#"Already up-to-date."; \
|
||||||
git submodule init ; \
|
git submodule init ; \
|
||||||
git submodule update; \
|
git submodule update; \
|
||||||
$(swap_dialog)
|
$(swap_dialog)
|
||||||
|
|
||||||
$(DESTDIR):
|
$(DESTDIR):
|
||||||
git clone https://github.com/${PROJECT}.git $@
|
git clone https://github.com/${PROJECT}.git $@
|
||||||
|
|
Loading…
Reference in a new issue