diff --git a/1.0.0.tar.gz b/1.0.0.tar.gz deleted file mode 100644 index 91ba84e..0000000 --- a/1.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8bd3c46f1cfd68d82d97fa72a68a07c966092c77f276d1335cb390b2ec6062bf -size 27691 diff --git a/default-location.patch b/default-location.patch deleted file mode 100644 index 65369e7..0000000 --- a/default-location.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/bin/homeshick b/bin/homeshick -index 46fd1da..b1e4a6f 100755 ---- a/bin/homeshick -+++ b/bin/homeshick -@@ -2,7 +2,7 @@ - - repos="$HOME/.homesick/repos" - # Include all helper functions. We will include the required command function later on. --homeshick=${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick} -+homeshick=${HOMESHICK_DIR:-/usr/share/homeshick} - source "$homeshick/lib/exit_status.sh" - source "$homeshick/lib/fs.sh" - source "$homeshick/lib/git.sh" -diff --git a/bin/homeshick.csh b/bin/homeshick.csh -index 2814f10..1c2c9a2 100644 ---- a/bin/homeshick.csh -+++ b/bin/homeshick.csh -@@ -1,6 +1,6 @@ - # This helper script should be sourced via an alias, e.g. - # --# alias homeshick "source $HOME/.homesick/repos/homeshick/bin/homeshick.csh" -+# alias homeshick "source /usr/share/homeshick/bin/homeshick.csh" - # - if ( "$1" == "cd" && "x$2" != "x" ) then - if ( -d "$HOME/.homesick/repos/$2/home" ) then -@@ -12,6 +12,6 @@ else - if ( $?HOMESHICK_DIR ) then - $HOMESHICK_DIR/bin/homeshick $* - else -- $HOME/.homesick/repos/homeshick/bin/homeshick $* -+ /usr/share/homeshick/bin/homeshick $* - endif - endif -diff --git a/homeshick.fish b/homeshick.fish -index 10359ee..51cd0a2 100644 ---- a/homeshick.fish -+++ b/homeshick.fish -@@ -1,5 +1,5 @@ - # This script should be sourced in the context of your shell like so: --# source $HOME/.homesick/repos/homeshick/homeshick.fish -+# source /usr/share/homeshick/homeshick.fish - # Once the homeshick() function is defined, you can type - # "homeshick cd CASTLE" to enter a castle. - -@@ -9,6 +9,6 @@ function homeshick - else if set -q HOMESHICK_DIR - eval $HOMESHICK_DIR/bin/homeshick $argv - else -- eval $HOME/.homesick/repos/homeshick/bin/homeshick $argv -+ eval /usr/share/homeshick/bin/homeshick $argv - end - end -diff --git a/homeshick.sh b/homeshick.sh -index e8c2663..797731d 100644 ---- a/homeshick.sh -+++ b/homeshick.sh -@@ -7,6 +7,6 @@ function homeshick() { - if [ "$1" = "cd" ] && [ -n "$2" ]; then - cd "$HOME/.homesick/repos/$2" - else -- "${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@" -+ "${HOMESHICK_DIR:-/usr/share/homeshick}/bin/homeshick" "$@" - fi - } diff --git a/homeshick.changes b/homeshick.changes index 1f58c3e..b744d58 100644 --- a/homeshick.changes +++ b/homeshick.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jun 7 19:47:32 UTC 2018 - seroton10@gmail.com + +- Upgrade to version 1.1.0: + * symlinks are now relative (useful when linking for a chrooted environment + or when renaming the home folder) + * fish shell completion (guide in wiki) + * homeshick.sh can now be sourced from dash as well + * the entire codebase is now linted with shellcheck + * loads of minor bugfixes +- Rename default-location.patch to suse-packaging.patch + ------------------------------------------------------------------- Tue May 26 16:28:59 UTC 2015 - seroton10@gmail.com diff --git a/homeshick.rpmlintrc b/homeshick.rpmlintrc index 3fc8cf9..50e83c9 100644 --- a/homeshick.rpmlintrc +++ b/homeshick.rpmlintrc @@ -1,2 +1,3 @@ addFilter("non-executable-script .*/usr/share/homeshick/lib") +addFilter("env-script-interpreter .*/usr/share/homeshick/lib") diff --git a/homeshick.spec b/homeshick.spec index e3b9eb4..e35ea54 100644 --- a/homeshick.spec +++ b/homeshick.spec @@ -1,7 +1,7 @@ # # spec file for package homeshick # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,16 @@ Name: homeshick -Version: 1.0.0 +Version: 1.1.0 Release: 0 Summary: Dotfile synchronizer based on Git and Bash License: MIT Group: Productivity/File utilities Url: https://github.com/andsens/homeshick -Source0: https://github.com/andsens/homeshick/archive/%{version}.tar.gz +Source0: https://github.com/andsens/homeshick/archive/v%{version}.tar.gz Source1: README-openSUSE.md Source99: homeshick.rpmlintrc -Patch0: default-location.patch +Patch0: suse-packaging.patch BuildRequires: expect BuildRequires: git >= 1.5 BuildRequires: iputils @@ -35,24 +35,19 @@ Requires: bash >= 3 Requires: git >= 1.5 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -%if 0%{?suse_version} && 0%{?suse_version} > 1320 +%if 0%{?is_opensuse} BuildRequires: bats BuildRequires: fish %endif %description -In Unix, configuration files are king. Tailoring tools to suit your needs -through configuration can be empowering. An immense number of hours is spent -on getting these adjustments just right, but once you leave the confines of -your own computer, these local optimizations are left behind. - Homeshick is a tool for users to manage configuration files, also known as dotfiles. It leverages Git repositories to store and version dotfiles, and to synchronize dotfile repositories between accounts and/or machines. -For example, this allows installing large external frameworks (such as -oh-my-zsh, or a multitude of emacs or vim plugins) found on sites like -https://dotfiles.github.io/ alongside personal dotfiles without clutter. +For example, this allows managing personal dotfiles alongside emacs or vim +plugins without clutter. It also makes it easy to install large external +frameworks, such as oh-my-zsh, found on sites like https://dotfiles.github.io/. %prep %setup -q -n %{name}-%{version} @@ -68,14 +63,15 @@ ln -s %{_datadir}/%{name}/bin/homeshick %{buildroot}%{_bindir}/%{name} cp %{SOURCE1} . %check -# only run tests if bats is available +# run tests if bats is available if type bats &>/dev/null; then HOMESHICK_DIR=%{buildroot}%{_datadir}/%{name} bats test/suites fi %files %defattr(-,root,root) -%doc README.md README-openSUSE.md LICENSE CONTRIBUTING.md +%doc README.md README-openSUSE.md CONTRIBUTING.md +%license LICENSE %{_datadir}/%{name} %{_bindir}/homeshick diff --git a/suse-packaging.patch b/suse-packaging.patch new file mode 100644 index 0000000..95aafa7 --- /dev/null +++ b/suse-packaging.patch @@ -0,0 +1,70 @@ +diff -r -u homeshick-1.1.0-orig/bin/homeshick homeshick-1.1.0/bin/homeshick +--- homeshick-1.1.0-orig/bin/homeshick 2018-04-12 21:52:30.000000000 +0200 ++++ homeshick-1.1.0/bin/homeshick 2018-06-07 21:42:03.651248460 +0200 +@@ -1,8 +1,8 @@ +-#!/usr/bin/env bash ++#!/bin/bash + + repos="$HOME/.homesick/repos" + # Include all helper functions. We will include the required command function later on. +-homeshick=${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick} ++homeshick=${HOMESHICK_DIR:-/usr/share/homeshick} + # On travis-ci exit_status for some reason errors out, ignore it + # shellcheck disable=SC1090 + source "$homeshick/lib/exit_status.sh" +diff -r -u homeshick-1.1.0-orig/bin/homeshick.csh homeshick-1.1.0/bin/homeshick.csh +--- homeshick-1.1.0-orig/bin/homeshick.csh 2018-04-12 21:52:30.000000000 +0200 ++++ homeshick-1.1.0/bin/homeshick.csh 2018-06-07 21:35:03.398240964 +0200 +@@ -1,6 +1,6 @@ + # This helper script should be sourced via an alias, e.g. + # +-# alias homeshick "source $HOME/.homesick/repos/homeshick/bin/homeshick.csh" ++# alias homeshick "source /usr/share/homeshick/bin/homeshick.csh" + # + if ( "$1" == "cd" && "x$2" != "x" ) then + if ( -d "$HOME/.homesick/repos/$2/home" ) then +@@ -12,6 +12,6 @@ + if ( $?HOMESHICK_DIR ) then + $HOMESHICK_DIR/bin/homeshick $* + else +- $HOME/.homesick/repos/homeshick/bin/homeshick $* ++ /usr/share/homeshick/bin/homeshick $* + endif + endif +diff -r -u homeshick-1.1.0-orig/homeshick.fish homeshick-1.1.0/homeshick.fish +--- homeshick-1.1.0-orig/homeshick.fish 2018-04-12 21:52:30.000000000 +0200 ++++ homeshick-1.1.0/homeshick.fish 2018-06-07 21:35:03.398240964 +0200 +@@ -1,5 +1,5 @@ + # This script should be sourced in the context of your shell like so: +-# source $HOME/.homesick/repos/homeshick/homeshick.fish ++# source /usr/share/homeshick/homeshick.fish + # Once the homeshick() function is defined, you can type + # "homeshick cd CASTLE" to enter a castle. + +@@ -9,6 +9,6 @@ + else if set -q HOMESHICK_DIR + eval $HOMESHICK_DIR/bin/homeshick (string escape -- $argv) + else +- eval $HOME/.homesick/repos/homeshick/bin/homeshick (string escape -- $argv) ++ eval /usr/share/homeshick/bin/homeshick (string escape -- $argv) + end + end +diff -r -u homeshick-1.1.0-orig/homeshick.sh homeshick-1.1.0/homeshick.sh +--- homeshick-1.1.0-orig/homeshick.sh 2018-04-12 21:52:30.000000000 +0200 ++++ homeshick-1.1.0/homeshick.sh 2018-06-07 21:40:18.111999430 +0200 +@@ -1,6 +1,5 @@ +-#!/usr/bin/env sh + # This script should be sourced in the context of your shell like so: +-# source $HOME/.homeshick/repos/.homeshick/homeshick.sh ++# source /usr/share/homeshick/homeshick.sh + # Once the homeshick() function is defined, you can type + # "homeshick cd CASTLE" to enter a castle. + +@@ -10,6 +9,6 @@ + # shellcheck disable=SC2164 + cd "$HOME/.homesick/repos/$2" + else +- "${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@" ++ "${HOMESHICK_DIR:-/usr/share/homeshick}/bin/homeshick" "$@" + fi + } diff --git a/v1.1.0.tar.gz b/v1.1.0.tar.gz new file mode 100644 index 0000000..bf77a81 --- /dev/null +++ b/v1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1894675f4f2ab002a97574445c03c7c7336c996c01023b7fc5e6668dce7d5a3c +size 33345