Skip to content

Commit

Permalink
Merge pull request #2 from TheNewNormal/v0.0.8
Browse files Browse the repository at this point in the history
V0.0.8
  • Loading branch information
rimusz authored Jul 5, 2016
2 parents 7c32e19 + f869146 commit e3903b9
Show file tree
Hide file tree
Showing 22 changed files with 733 additions and 18 deletions.
Binary file added src/bin/corectl
Binary file not shown.
Binary file added src/bin/corectld
Binary file not shown.
Binary file added src/bin/corectld.runner
Binary file not shown.
17 changes: 17 additions & 0 deletions src/check_blobs_version.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# get installed version
INSTALLED_VERSION=v$(/usr/local/sbin/corectld version | grep "Version:" | head -1 | awk '{print $2}' | tr -d '\r')

# get remote version
CORECTL_VERSION=$(curl -Ss https://api.github.com/repos/TheNewNormal/corectl/releases | grep "tag_name" | awk '{print $2}' | sed -e 's/"\(.*\)"./\1/' | head -1)

MATCH=$(echo "${INSTALLED_VERSION}" | grep -c "${CORECTL_VERSION}")

if [ $MATCH -eq 0 ]; then
# there is an update
echo "yes"
else
# no update available
echo "no"
fi
19 changes: 19 additions & 0 deletions src/copy_corectl_blobs.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

#
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${DIR}"/functions.sh

res_folder=$1

# copy blobs
# get password for sudo
my_password=$(security find-generic-password -wa coreosctl-app)
# reset sudo
sudo -k > /dev/null 2>&1

printf '%s\n' "$my_password" | sudo -Sv > /dev/null 2>&1

# copy blobs
echo "Copying files ..."
sudo cp -f "${res_folder}"/* /usr/local/sbin
40 changes: 38 additions & 2 deletions src/corectl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,44 @@
objects = {

/* Begin PBXBuildFile section */
134F3CEC1D2C2270002B9668 /* check_blobs_version.command in Resources */ = {isa = PBXBuildFile; fileRef = 134F3CEB1D2C2270002B9668 /* check_blobs_version.command */; };
136605381D23CCB200D497A0 /* fetch_latest_iso_alpha.command in Resources */ = {isa = PBXBuildFile; fileRef = 136605361D23CCB200D497A0 /* fetch_latest_iso_alpha.command */; };
136605391D23CCB200D497A0 /* functions.sh in Resources */ = {isa = PBXBuildFile; fileRef = 136605371D23CCB200D497A0 /* functions.sh */; };
1366053B1D23D6AD00D497A0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1366053A1D23D6AD00D497A0 /* Foundation.framework */; };
1366053D1D23D6B800D497A0 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1366053C1D23D6B800D497A0 /* AppKit.framework */; };
1366053F1D23D6C700D497A0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1366053E1D23D6C700D497A0 /* Cocoa.framework */; };
136605431D23E85800D497A0 /* fetch_latest_iso_beta.command in Resources */ = {isa = PBXBuildFile; fileRef = 136605411D23E85800D497A0 /* fetch_latest_iso_beta.command */; };
136605441D23E85800D497A0 /* fetch_latest_iso_stable.command in Resources */ = {isa = PBXBuildFile; fileRef = 136605421D23E85800D497A0 /* fetch_latest_iso_stable.command */; };
1375975B1D2BA78E000CB88F /* bin in Resources */ = {isa = PBXBuildFile; fileRef = 1375975A1D2BA78E000CB88F /* bin */; };
1375975F1D2BA816000CB88F /* get_go_binaries in Resources */ = {isa = PBXBuildFile; fileRef = 1375975E1D2BA816000CB88F /* get_go_binaries */; };
137597631D2BC9CF000CB88F /* update_corectl_blobs.command in Resources */ = {isa = PBXBuildFile; fileRef = 137597621D2BC9CF000CB88F /* update_corectl_blobs.command */; };
137597651D2BD5A6000CB88F /* copy_corectl_blobs.command in Resources */ = {isa = PBXBuildFile; fileRef = 137597641D2BD5A5000CB88F /* copy_corectl_blobs.command */; };
137597671D2BE71C000CB88F /* sudo_password.command in Resources */ = {isa = PBXBuildFile; fileRef = 137597661D2BE71C000CB88F /* sudo_password.command */; };
1375976B1D2BF306000CB88F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1375976A1D2BF306000CB88F /* Security.framework */; };
1375976D1D2BF361000CB88F /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1375976C1D2BF361000CB88F /* Keychain.swift */; };
1375976F1D2C05AA000CB88F /* start_corectld.command in Resources */ = {isa = PBXBuildFile; fileRef = 1375976E1D2C05AA000CB88F /* start_corectld.command */; };
13CAFC2A1D2272B000E57ED4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CAFC291D2272B000E57ED4 /* AppDelegate.swift */; };
13CAFC2C1D2272B000E57ED4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13CAFC2B1D2272B000E57ED4 /* Assets.xcassets */; };
13CAFC2F1D2272B000E57ED4 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13CAFC2D1D2272B000E57ED4 /* MainMenu.xib */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
134F3CEB1D2C2270002B9668 /* check_blobs_version.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = check_blobs_version.command; sourceTree = "<group>"; };
136605361D23CCB200D497A0 /* fetch_latest_iso_alpha.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = fetch_latest_iso_alpha.command; sourceTree = "<group>"; };
136605371D23CCB200D497A0 /* functions.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = functions.sh; sourceTree = "<group>"; };
1366053A1D23D6AD00D497A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1366053C1D23D6B800D497A0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
1366053E1D23D6C700D497A0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
136605411D23E85800D497A0 /* fetch_latest_iso_beta.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = fetch_latest_iso_beta.command; sourceTree = "<group>"; };
136605421D23E85800D497A0 /* fetch_latest_iso_stable.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = fetch_latest_iso_stable.command; sourceTree = "<group>"; };
1375975A1D2BA78E000CB88F /* bin */ = {isa = PBXFileReference; lastKnownFileType = folder; path = bin; sourceTree = "<group>"; };
1375975E1D2BA816000CB88F /* get_go_binaries */ = {isa = PBXFileReference; lastKnownFileType = folder; path = get_go_binaries; sourceTree = "<group>"; };
137597621D2BC9CF000CB88F /* update_corectl_blobs.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = update_corectl_blobs.command; sourceTree = "<group>"; };
137597641D2BD5A5000CB88F /* copy_corectl_blobs.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = copy_corectl_blobs.command; sourceTree = "<group>"; };
137597661D2BE71C000CB88F /* sudo_password.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = sudo_password.command; sourceTree = "<group>"; };
1375976A1D2BF306000CB88F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
1375976C1D2BF361000CB88F /* Keychain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
1375976E1D2C05AA000CB88F /* start_corectld.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = start_corectld.command; sourceTree = "<group>"; };
13CAFC261D2272B000E57ED4 /* corectl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = corectl.app; sourceTree = BUILT_PRODUCTS_DIR; };
13CAFC291D2272B000E57ED4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
13CAFC2B1D2272B000E57ED4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand All @@ -39,6 +57,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1375976B1D2BF306000CB88F /* Security.framework in Frameworks */,
1366053F1D23D6C700D497A0 /* Cocoa.framework in Frameworks */,
1366053D1D23D6B800D497A0 /* AppKit.framework in Frameworks */,
1366053B1D23D6AD00D497A0 /* Foundation.framework in Frameworks */,
Expand All @@ -51,9 +70,14 @@
136605351D23CC9A00D497A0 /* scripts */ = {
isa = PBXGroup;
children = (
134F3CEB1D2C2270002B9668 /* check_blobs_version.command */,
1375976E1D2C05AA000CB88F /* start_corectld.command */,
136605361D23CCB200D497A0 /* fetch_latest_iso_alpha.command */,
136605411D23E85800D497A0 /* fetch_latest_iso_beta.command */,
136605421D23E85800D497A0 /* fetch_latest_iso_stable.command */,
137597621D2BC9CF000CB88F /* update_corectl_blobs.command */,
137597641D2BD5A5000CB88F /* copy_corectl_blobs.command */,
137597661D2BE71C000CB88F /* sudo_password.command */,
136605371D23CCB200D497A0 /* functions.sh */,
);
name = scripts;
Expand All @@ -62,6 +86,7 @@
136605401D23D6F600D497A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
1375976A1D2BF306000CB88F /* Security.framework */,
1366053E1D23D6C700D497A0 /* Cocoa.framework */,
1366053C1D23D6B800D497A0 /* AppKit.framework */,
1366053A1D23D6AD00D497A0 /* Foundation.framework */,
Expand All @@ -73,6 +98,8 @@
isa = PBXGroup;
children = (
13CAFC281D2272B000E57ED4 /* corectl */,
1375975A1D2BA78E000CB88F /* bin */,
1375975E1D2BA816000CB88F /* get_go_binaries */,
136605351D23CC9A00D497A0 /* scripts */,
136605401D23D6F600D497A0 /* Frameworks */,
13CAFC271D2272B000E57ED4 /* Products */,
Expand All @@ -91,6 +118,7 @@
isa = PBXGroup;
children = (
13CAFC291D2272B000E57ED4 /* AppDelegate.swift */,
1375976C1D2BF361000CB88F /* Keychain.swift */,
13CAFC2B1D2272B000E57ED4 /* Assets.xcassets */,
13CAFC2D1D2272B000E57ED4 /* MainMenu.xib */,
13CAFC301D2272B000E57ED4 /* Info.plist */,
Expand Down Expand Up @@ -157,12 +185,19 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
137597631D2BC9CF000CB88F /* update_corectl_blobs.command in Resources */,
1375975F1D2BA816000CB88F /* get_go_binaries in Resources */,
136605441D23E85800D497A0 /* fetch_latest_iso_stable.command in Resources */,
13CAFC2C1D2272B000E57ED4 /* Assets.xcassets in Resources */,
13CAFC2F1D2272B000E57ED4 /* MainMenu.xib in Resources */,
136605391D23CCB200D497A0 /* functions.sh in Resources */,
137597651D2BD5A6000CB88F /* copy_corectl_blobs.command in Resources */,
1375975B1D2BA78E000CB88F /* bin in Resources */,
136605381D23CCB200D497A0 /* fetch_latest_iso_alpha.command in Resources */,
137597671D2BE71C000CB88F /* sudo_password.command in Resources */,
134F3CEC1D2C2270002B9668 /* check_blobs_version.command in Resources */,
136605431D23E85800D497A0 /* fetch_latest_iso_beta.command in Resources */,
1375976F1D2C05AA000CB88F /* start_corectld.command in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -174,6 +209,7 @@
buildActionMask = 2147483647;
files = (
13CAFC2A1D2272B000E57ED4 /* AppDelegate.swift in Sources */,
1375976D1D2BF361000CB88F /* Keychain.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -281,7 +317,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = corectl/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = linxos.net.corectl;
PRODUCT_BUNDLE_IDENTIFIER = linxos.net.corectl.app;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
Expand All @@ -294,7 +330,7 @@
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = corectl/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = linxos.net.corectl;
PRODUCT_BUNDLE_IDENTIFIER = linxos.net.corectl.app;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
Expand Down
Binary file not shown.
Loading

0 comments on commit e3903b9

Please sign in to comment.