Skip to content

Commit

Permalink
Bugfixes, output format improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
noccy80 committed Dec 16, 2016
1 parent e68e53a commit b12430e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/phpl-config
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ if (cmdl_get($opts,'list')) {
printf(" \e[1m%-15s\e[0m %-15s [\e[37;44m%s\e[0m]\n %s\n", $item[0], $item[1], demo($item), $attr);
}
} elseif (cmdl_get($opts,'list-modules')) {
printf("Available modules:\n");
printf("Available modules and options:\n");
foreach ($_MODULES as $module) {
printf(" - \e[1m%s\e[0m: %s\n", $module->name, $module->info);
foreach ($module->opts as $opt) {
printf(" + <%s>%s - %s (default:\e[1m%s\e[0m)\n", $opt->type, $opt->name, $opt->descr, var_export($opt->def,true));
printf(" = \e[94m%s\e[0m<\e[36m%s\e[0m> - %s (default:\e[1m%s\e[0m)\n", $opt->name, $opt->type, $opt->descr, var_export($opt->def,true));
}
}
} elseif (($delete = cmdl_get($opts,'delete'))) {
Expand Down
10 changes: 6 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,29 @@ cp -R bin $INSTALL_DIR/
cp powerline.sh $INSTALL_DIR/
echo " Done"

echo "Installing modules:"
echo -n "Installing modules:"
MODULES_SRC=./modules
MODULES_DST=$INSTALL_DIR/modules
if [ ! -d $MODULES_DST ]; then
mkdir $MODULES_DST
fi
for MODULE in $MODULES_SRC/*.php; do
echo " ~> $(basename $MODULE .php)"
# echo " ~> $(basename $MODULE .php)"
cp $MODULE $MODULES_DST
done
echo " Done"

echo "Installing themes:"
echo -n "Installing themes:"
THEMES_SRC=./themes
THEMES_DST=$INSTALL_DIR/themes
if [ ! -d $THEMES_DST ]; then
mkdir $THEMES_DST
fi
for THEME in $THEMES_SRC/*.theme; do
echo " ~> $(basename $THEME .theme)"
# echo " ~> $(basename $THEME .theme)"
cp $THEME $THEMES_DST
done
echo " Done"

if [ ! -d ~/bin ]; then
echo "Skipping automatic symlink creation, please add $INSTALL_DIR/bin to your path."
Expand Down
2 changes: 1 addition & 1 deletion lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function config_item_delete($name) {
global $_CONFIG;
$filtered = [];
foreach ($_CONFIG['items'] as $item) {
if ($item[1]!=$name) {
if ($item[0]!=$name) {
$filtered[] = $item;
}
}
Expand Down

0 comments on commit b12430e

Please sign in to comment.