Skip to content

Commit

Permalink
install script quit on compile error; update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenArcher committed Jun 30, 2023
1 parent 75cfcf6 commit 5007fd8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ A dynamic window manager - FrozenArcher's fork

```bash
git clone [email protected]:FrozenArcher/dwm.git $HOME/dwm
cd $HOME/dwm
cd $HOME/dwm/dwmblocks
git submodule init
git submodule update
cd ..
sudo ./install
```

## Launching

Via a display manager or in your `.xinitrc`:
Via a display manager or in your `.xinitrc`, add:

```bash
launch_dwm
Expand Down
6 changes: 6 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# TODO

* change install script to makefile
* add systray
* bar modules
* independent configuration
14 changes: 14 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/sh
# exit code:
# 0: success
# 1: user's error
# 2: compile error

_dwm_dir="./dwm-src"
_blks_dir="./dwmblocks-async"

if [[ -z "$(ls | grep dwm.desktop)" ]]; then
echo "Wrong directory. Please check if you are in the project root directory."
exit 1
fi

if [[ "$1" == "clean" ]]; then
Expand All @@ -28,6 +33,11 @@ if [ -f ./config.h ]; then
fi

make >> ../make.log
if [ $? -ne 0 ]; then
echo "==> !! DWM compile error. Please see make.log for details."
exit 2
fi

echo " --- dwm install ---" >> ../make.log
make install >> ../make.log
cd ..
Expand All @@ -40,6 +50,10 @@ cp -fv ./config-dwmblocks.c ./dwmblocks-async/config.c
cd $_blks_dir
echo " --- dwmblocks ---" >> ../make.log
make install >> ../make.log
if [ $? -ne 0 ]; then
echo "==> !! dwmblocks compile error. Please see make.log for details."
exit 2
fi

echo " --- DONE --- " >> ../make.log
echo "==> Done"
Expand Down

0 comments on commit 5007fd8

Please sign in to comment.