Olav Reinert 2018-06-06 19:55:02 +00:00 committed by Git OBS Bridge
parent 1aaee431de
commit 05df5a2152
7 changed files with 46 additions and 73 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8bd3c46f1cfd68d82d97fa72a68a07c966092c77f276d1335cb390b2ec6062bf
size 27691

View File

@ -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
}

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Jun 6 19:43:22 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
-------------------------------------------------------------------
Tue May 26 16:28:59 UTC 2015 - seroton10@gmail.com

View File

@ -1,2 +1,3 @@
addFilter("non-executable-script .*/usr/share/homeshick/lib")
addFilter("env-script-interpreter .*/usr/share/homeshick/lib")

View File

@ -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
@ -68,14 +68,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

24
suse-packaging.patch Normal file
View File

@ -0,0 +1,24 @@
diff -c -r 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-06 21:28:43.247842198 +0200
***************
*** 1,4 ****
! #!/usr/bin/env bash
repos="$HOME/.homesick/repos"
# Include all helper functions. We will include the required command function later on.
--- 1,4 ----
! #!/bin/bash
repos="$HOME/.homesick/repos"
# Include all helper functions. We will include the required command function later on.
diff -c -r 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-06 21:32:39.506072561 +0200
***************
*** 1,4 ****
- #!/usr/bin/env sh
# This script should be sourced in the context of your shell like so:
# source $HOME/.homeshick/repos/.homeshick/homeshick.sh
# Once the homeshick() function is defined, you can type
--- 1,3 ----

3
v1.1.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1894675f4f2ab002a97574445c03c7c7336c996c01023b7fc5e6668dce7d5a3c
size 33345