diff options
-rwxr-xr-x | build_compiz++ | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/build_compiz++ b/build_compiz++ index 67cea71..a3b5bc5 100755 --- a/build_compiz++ +++ b/build_compiz++ @@ -108,6 +108,7 @@ while [[ $1 != "" ]]; do --dont-reset) DONT_RESET="true"; shift;; --prefix=*) PREFIX=${1#--prefix=}; shift;; --src_dir=*) SRC_DIR=${1#--src_dir=}; shift;; + --list-targets) list_targets="true"; shift;; --) shift; break;; *) echo "invalid option: $1" 1>&2; show_help; exit 1;; esac @@ -119,6 +120,9 @@ PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/lib64/pkgconfig:$PREFIX/lib32/pkgc LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib64:$PREFIX/lib32:$LD_LIBRARY_PATH CWD="$(dirname "$(readlink /proc/$$/fd/255)")" +# Only set components if we're just listing targets +if [[ "$list_targets" != "true" ]]; then + # Only attempt update if --dont-reset isn't passed if [[ "$DONT_RESET" != "true" ]]; then @@ -186,6 +190,9 @@ echo "Python version detection failed." DEPENDENCIES="git-core cmake libcairo2-dev librsvg2-dev libpng12-dev libjpeg62-dev libdbus-1-dev libboost-dev libboost-serialization-dev libxml2-dev libgl1-mesa-dev libglu1-mesa-dev libx11-xcb-dev libxslt1-dev xsltproc libglibmm-2.4-dev libnotify-dev libprotobuf-dev intltool cython python2.7-dev" fi +# endif [[ "$list_targets" != "true" ]] +fi + # Components to build components=(core libcompizconfig compizconfig-python ccsm) @@ -223,6 +230,7 @@ fi # plugins-unsupported is deliberately built twice as a workaround to elements failing the first time components+=(plugins-main plugins-extra plugins-unsupported plugins-unsupported) +if [[ "$list_targets" != "true" ]]; then if [[ "$GEN_SCRIPTS" = "true" ]]; then echo @@ -540,8 +548,20 @@ chmod +x $FILE mkdir -p $SRC_DIR +# if [[ "$list_targets" != "true" ]] +else + echo + echo "The following components will be built:" + echo +fi + for COMPONENT in "${components[@]}"; do + if [[ "$list_targets" = "true" ]]; then + echo "$COMPONENT" + continue + fi + unset config_component if [[ -n "$first_component" ]]; then @@ -630,19 +650,21 @@ for COMPONENT in "${components[@]}"; do fi done -echo -echo -echo "By default, there are no plugins enabled. You will want at least" -echo "Window Decoration and Move Window loaded to do anything useful." -echo "A few others to enable are Place Windows, Resize Window and Application Switcher," -echo "all of which are in the Window Management category." -echo -read -p "Would you like to start ccsm++ now? y/n: " response +if [[ "$list_targets" != "true" ]]; then + echo + echo + echo "By default, there are no plugins enabled. You will want at least" + echo "Window Decoration and Move Window loaded to do anything useful." + echo "A few others to enable are Place Windows, Resize Window and Application Switcher," + echo "all of which are in the Window Management category." + echo + read -p "Would you like to start ccsm++ now? y/n: " response -if [[ $response = "y" ]]; then -$PREFIX/bin/ccsm++ & -elif [[ $response = "n" ]]; then -echo "Done. Run $PREFIX/bin/compiz++ to start compiz or $PREFIX/bin/ccsm++ to start ccsm." -else -echo "Invalid response, assuming 'no'. If you want to start compiz++ run $PREFIX/bin/compiz++" + if [[ $response = "y" ]]; then + $PREFIX/bin/ccsm++ & + elif [[ $response = "n" ]]; then + echo "Done. Run $PREFIX/bin/compiz++ to start compiz or $PREFIX/bin/ccsm++ to start ccsm." + else + echo "Invalid response, assuming 'no'. If you want to start compiz++ run $PREFIX/bin/compiz++" + fi fi |